﻿/**********************************************************
 * AjaxScript 
 * -------------------------------------------------------
 * Author:Houfeng
 * Email:Houzhanfeng@gmail.com
 *********************************************************/

//重写__doPostBack
function __doPostBack(eventTarget, eventArgument) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        //
        var eventTargetObj=document.getElementById(eventTarget.replace(new RegExp("\\\$","gm"),"_"));
        if(eventTargetObj!=null && eventTargetObj.attributes['notAjax']!=null){
            if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
                theForm.__NOTAJAX.value='notajax';
                theForm.submit();
                return false ;
            }
        }
        else{ theForm.__NOTAJAX.value=''; }
        //
        var serializeDataString = __AjaxEngine.createSerializeData();
        __AjaxEngine.callServer("", "", true, function (rs) { return false; }, serializeDataString);
        return;
}
